<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <my-cpn></my-cpn>
    </div>
</body>
<script src="../js/http_cdn.bootcdn.net_ajax_libs_vue_2.6.6_vue.js"></script>
<script>
    //  创建组件构造器
    const cpn = Vue.extend({
        template: `<div>
                        <h2>
                            我是标题
                        </h2>
                        <div>
                            我是内容，哈哈哈
                        </div>
                        <div>
                            我是内容，呵呵呵
                        </div>
                    </div>`
    })
    //  注册组件
    Vue.component('my-cpn', cpn)

    new Vue({
        el: "#app",
    })
</script>

</html>
